const router = require('koa-joi-router')
const site = router()
const Joi = router.Joi
const siteCtrl = require('../controller/site')
site.prefix('/site')
site.route({
  method: 'get',
  path: '/getSiteConfigByName',
  validate: {
    query: {
      name: Joi.string().default('')
    }
  },
  handler: siteCtrl.getSiteConfigByName
})

module.exports = site
